package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.ReservationsMapper;
import com.ruoyi.system.domain.Reservations;
import com.ruoyi.system.service.IReservationsService;

/**
 * 预约管理Service业务层处理
 * 
 * @author zdk
 * @date 2025-05-12
 */
@Service
public class ReservationsServiceImpl implements IReservationsService 
{
    @Autowired
    private ReservationsMapper reservationsMapper;

    /**
     * 查询预约管理
     * 
     * @param id 预约管理主键
     * @return 预约管理
     */
    @Override
    public Reservations selectReservationsById(String id)
    {
        return reservationsMapper.selectReservationsById(id);
    }

    /**
     * 查询预约管理列表
     * 
     * @param reservations 预约管理
     * @return 预约管理
     */
    @Override
    public List<Reservations> selectReservationsList(Reservations reservations)
    {
        return reservationsMapper.selectReservationsList(reservations);
    }

    /**
     * 新增预约管理
     * 
     * @param reservations 预约管理
     * @return 结果
     */
    @Override
    public int insertReservations(Reservations reservations)
    {
        reservations.setCreateTime(DateUtils.getNowDate());
        return reservationsMapper.insertReservations(reservations);
    }

    /**
     * 修改预约管理
     * 
     * @param reservations 预约管理
     * @return 结果
     */
    @Override
    public int updateReservations(Reservations reservations)
    {
        reservations.setUpdateTime(DateUtils.getNowDate());
        return reservationsMapper.updateReservations(reservations);
    }

    /**
     * 批量删除预约管理
     * 
     * @param ids 需要删除的预约管理主键
     * @return 结果
     */
    @Override
    public int deleteReservationsByIds(String[] ids)
    {
        return reservationsMapper.deleteReservationsByIds(ids);
    }

    /**
     * 删除预约管理信息
     * 
     * @param id 预约管理主键
     * @return 结果
     */
    @Override
    public int deleteReservationsById(String id)
    {
        return reservationsMapper.deleteReservationsById(id);
    }
}
